-- GENERATED SPELL FOR [Abjurist Belmara] --


function spell0_19546(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(34447,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19546', 600, 1)
end

function spell1_19546(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_19546', 0, 1)
end

function spell2_19546(pUnit, Event) --@Mana Shield,Self--
pUnit:FullCastSpellOnTarget(17740,pUnit)
pUnit:RegisterEvent('Sorts_19546', 549, 1)
end

function Sorts_19546(pUnit, Event)
local choix_sorts_19546 = math.random(0, 2)
if choix_sorts_19546 == 0 then
pUnit:RegisterEvent('spell0_19546', 1, 1)
end
if choix_sorts_19546 == 1 then
pUnit:RegisterEvent('spell1_19546', 1, 1)
end
if choix_sorts_19546 == 2 then
pUnit:RegisterEvent('spell2_19546', 1, 1)
end
end

function mob19546_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19546', math.random(1500, 3000), 1)
end

function mob19546_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19546_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19546_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19546, 1, 'mob19546_Action')
RegisterUnitEvent(19546, 2, 'mob19546_Leave')
RegisterUnitEvent(19546, 3, 'mob19546_Kill')
RegisterUnitEvent(19546, 4, 'mob19546_Die')
